import request from "@/utils/request";

// 查询行情分类
export function getAllAssort(type: string) {
  return request({
    url: `/spot/his/getAllAssort/${type}`,
    method: "get",
  });
}

// 查询行情分类对应的所有币对
export function getAllCoin(assortId: string,userId: string) {
  return request({
    url: `/spot/his/getAllCoin/${assortId}/${userId}`,
    method: "get",
  });
}

// 查询现货指定币对-k线数据
export function getKLine(data: object) {
  return request({
    url: "/spot/his/getKLine",
    method: "post",
    data,
  });
}

// 查询现货指定币对-盘口数据
export function getPlate(data: object) {
  return request({
    url: "/spot/his/getPlate",
    method: "post",
    data,
  });
}

// 查询现货指定币对-行情数据
export function getTickers(data: object) {
  return request({
    url: "/spot/his/getTickers",
    method: "post",
    data,
  });
}

// 查询现货指定币对-交易数据
export function getTrade(data: object) {
  return request({
    url: "/spot/his/getTrade",
    method: "post",
    data,
  });
}
